package com.platform.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.platform.dao.FarmInfoMapper;
import com.platform.entity.FarmInfoEntity;
import com.platform.service.FarmInfoService;

/**
 * 农机手册Service实现类
 *
 * @author lipengjun
 * @email 939961241@qq.com
 * @date 2020-02-23 21:56:20
 */
@Service("farmInfoService")
public class FarmInfoService {
    @Autowired
    private FarmInfoMapper farmInfoMapper;

    public List<FarmInfoEntity> slectFirstLevel() {
    	return  farmInfoMapper.selectFirstLevel();
    }
    
    public List<FarmInfoEntity> selectChildNodes(Map map) {
    	return  farmInfoMapper.selectChildNodes(map);
    }
    public List<FarmInfoEntity> searchFuzzy(Map map){
    	return farmInfoMapper.searchFuzzy(map);
    }
    public int searchFuzzyCount(Map map) {
    	return farmInfoMapper.searchFuzzyCount(map);
    }
    public FarmInfoEntity queryObject(Integer id) {
        return farmInfoMapper.selectByPrimaryKey(id);
    }

    
    public List<FarmInfoEntity> queryList(Map<String, Object> map) {
        return farmInfoMapper.queryList(map);
    }
    
    public List<FarmInfoEntity> queryNotPdfList(){
    	return farmInfoMapper.queryNotPdfList();
    }
    
    public int queryTotal(Map<String, Object> map) {
        return farmInfoMapper.queryTotal(map);
    }

    
    public int save(FarmInfoEntity farmInfo) {
        return farmInfoMapper.insertSelective(farmInfo);
    }

    
    public int update(FarmInfoEntity farmInfo) {
        return farmInfoMapper.updateByPrimaryKeySelective(farmInfo);
    }

    
    public int delete(Integer id) {
        return farmInfoMapper.deleteByPrimaryKey(id);
    }

    
    public int deleteBatch(Integer[] ids) {
        return farmInfoMapper.deleteBatch(ids);
    }
}
